﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlContact.ascx.cs" Inherits="Controls_ControlContact" %>
<%@ Import Namespace="webapp4U" %>
<link href='<%=Globals.ApplicationPath%>JScript/ui-lightness/jquery-ui-1.7.2.custom.css' rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=Globals.ApplicationPath%>JScript/jquery-ui-1.7.2.custom.min.js"></script>

<style type="text/css">

.no-close .ui-dialog-titlebar-close 
{
    display: none 
}
</style>

<script type="text/javascript">
    $(document).ready(function() {
        //Dành dialog

        //setup KhuyenMai dialog
        $('#MessgeBox').dialog({
            autoOpen: false,
            draggable: true,
            title: "Thông báo",
            resizable: false,
            //khong dùng phím để Close
            //closeOnEscape: false,
            //dung css hide Close x
            //dialogClass: 'no-close',
            //height: auto,
            width: 450,
            modal: true,
            open: function(type, data) {
                $(this).parent().appendTo("form");
            }
        });
        // $("#KhuyenMai.ui-dialog-titlebar").hide();

    });

    function showDialog(id) {
        $('#' + id).dialog("open");
    }

    function closeDialog(id) {
        $('#' + id).dialog("close");
    }
     
              
</script>
 
<div id="MessgeBox">    
    <asp:UpdatePanel ID="UpdatePanelDialog" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
            <ContentTemplate>
        <table>
            <tr>
                <td>
                   <asp:Label ID="lblThongBao" runat="server" Text=""></asp:Label>
                </td>
            </tr>
        </table>
    </ContentTemplate>
    </asp:UpdatePanel>
 </div> 
 <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
    <ContentTemplate>
<div class="title_main"><%=ResourceManager.GetString("Contact_Contact")%></div>    
              <div class="bg_under_title clearfix">
                   <div class="col_left">
                        <asp:Repeater runat="server" ID="rptContactSetting">
                            <ItemTemplate>
                                <table width="100%" border="0">
                      		        <tr>
                            	        <td>
                                          <p><%=ResourceManager.GetString("ContactSetting_CompanyName")%>:</p>
                                          <p><%=ResourceManager.GetString("ContactSetting_MainOffice")%>:</p>
                                          <p style="display:none;"><%=ResourceManager.GetString("ContactSetting_TransactionOffice")%>:</p>
                                          <p><%=ResourceManager.GetString("Register_ContactPhone")%>:</p>
                                          <p><%=ResourceManager.GetString("Register_FaxNumber")%>:</p>
                                          <p><%=ResourceManager.GetString("Register_Website")%>:</p>
                                          <p><%=ResourceManager.GetString("Email")%>:</p>
                            	        </td>
                                        <td>
                                	        <p><strong> <%#Eval("CompanyName")%></strong></p>
                                	        <p><strong> <%#Eval("Address")%></strong></p>
                                	        <p style="display:none;"><strong><%#Eval("Address1")%></strong></p>
                                	        <p><strong> <%#Eval("Phone")%></strong></p>
                                	        <p><strong> <%#Eval("Fax") %></strong></p>
                                	        <p style="color: red;"> <%#Eval("Website")%></p>
                               	            <p style="color: red;"> <%#Eval("Email")%></p>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:Repeater>
                  </div>
                  <div class="col_right magin_all">
                        <!--Contact form-->
                        <div class="tiltebar_form"><%=ResourceManager.GetString("Contact_FormLienHe")%></div>
                          <div class="hopphat_form">
                               <table border="0" _moz_resizing="true" class="tableFormFind first-child only-child last-child">
                                    <tr class="first-child">
                                          <td class="first-child"><label for="Name" class="first-child only-child last-child"><span class="requiredBlue first-child only-child last-child">*</span> <%=ResourceManager.GetString("FullName")%>: </label></td>
                                          <td class="last-child">
                                              <asp:TextBox ID="txtFullName" runat="server" MaxLength="2000" CssClass="input220 first-child only-child last-child"></asp:TextBox>
                                          </td>
                                    </tr>
                                    <tr>
                                        <td class="first-child"><label for="BusinessPhone" class="first-child only-child last-child"><%=ResourceManager.GetString("Address") %>: </label></td>
                                        <td class="last-child">
                                            <asp:TextBox ID="txtAddress" runat="server" MaxLength="2000" CssClass="input220 first-child only-child last-child"></asp:TextBox>   
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="first-child"><label for="BusinessPhone" class="first-child only-child last-child"><%=ResourceManager.GetString("Phone") %>: </label></td>
                                        <td class="last-child">
                                            <asp:TextBox ID="txtPhone" runat="server" MaxLength="2000" CssClass="input220 first-child only-child last-child"></asp:TextBox>   
                                        </td>
                                    </tr>
                                    <tr>
                                          <td class="first-child"><label for="Email" class="first-child only-child last-child"><span class="requiredBlue first-child only-child last-child">*</span><%=ResourceManager.GetString("Email") %>: </label> </td>
                                          <td class="last-child">
                                                <asp:TextBox ID="txtEmail" runat="server" MaxLength="2000" CssClass="input220 first-child only-child last-child"></asp:TextBox>  
                                                <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ControlToValidate="txtEmail" ID="RequiredFieldValidator3" ErrorMessage="The email can not be empty!" Display="none"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator SetFocusOnError="true" Display="none" id="emailRegExValidator" runat="server" ControlToValidate="txtEmail" CssClass="error" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="Địa chỉ email không hợp lệ!"></asp:RegularExpressionValidator>                                          
                                          </td>
                                    </tr>
                                    <tr>
                                        <td class="first-child"><label for="BusinessPhone" class="first-child only-child last-child"><%=ResourceManager.GetString("Title") %>: </label></td>
                                        <td class="last-child">
                                            <asp:TextBox ID="txtTitle" runat="server" MaxLength="2000" CssClass="input220 first-child only-child last-child"></asp:TextBox>   
                                        </td>
                                    </tr>
                                    <tr class="last-child">
                                        <td class="first-child" valign="top"><label for="Comment" class="first-child only-child last-child"><span class="requiredBlue first-child only-child last-child">*</span><%=ResourceManager.GetString("Content") %>: </label></td>
                                        <td class="last-child">
                                            <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Rows="8" MaxLength="2000" CssClass="input220 first-child only-child last-child" Width="208px"></asp:TextBox>
                                            <asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ControlToValidate="txtContent" ID="RequiredFieldValidator5" ErrorMessage="The content can not be empty!" Display="none"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                </table>
                          </div>
                          <div class="bgPurple clearfix last-child">
                              <div class="col_left formAlign first-child">
                                  <span class="required first-child"><strong class="first-child only-child last-child">(*)</strong> </span>
                                  <label class="last-child"><strong class="first-child only-child last-child"><%=ResourceManager.GetString("Register_Required")%> </div><asp:Button 
                                  ID="btnSend" runat="server" Text="Gửi" 
                                  CssClass="btnSubmit col_right last-child" CausesValidation="true" 
                                  onclick="btnSend_Click" /><asp:Button ID="btnClear" runat="server" 
                                  Text="Làm lại" CssClass="btnSubmit col_right last-child" 
                                  CausesValidation="false" onclick="btnClear_Click" /></div>
                        <!--End Contact form-->
                  </div>
              </div>
        </ContentTemplate>
    </asp:UpdatePanel>